home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10527 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: news2.ios.com!usenet
  2. From: Keith Boruff <kboruff@village.ios.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: interface and implementation question for a class
  5. Date: Fri, 08 Mar 1996 06:38:02 -0800
  6. Organization: Internet Online Services
  7. Message-ID: <3140464A.5B9B@village.ios.com>
  8. NNTP-Posting-Host: ppp-15.ts-3.nyc.idt.net
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (Win16; I)
  13.  
  14. I am sorry if this is more of a compiler question than a specific C++ question, but since it 
  15. involves a class that I have constructed, I thought that maybe someone could help me out on this 
  16. newsgroup.
  17.  
  18. I have constructed 3 files
  19.     time.h -> Includes the declaration of my class
  20.     time.cpp-> Includes member function definitions of my class
  21.     timedriv.cpp-> driver program for my class
  22.  
  23. I have compiled the time.cpp into time.lib (static) and then tried to compile and link my 
  24. timedriv.cpp program. Linking the latter code is where I am running into an error. It seems that 
  25. during the linking process, time.lib is not being seen. I have tried everything that I could 
  26. think of (moving time.lib to my /lib subdirectory) but to no avail.
  27.  
  28. I know that I could get this program to work if I insert all three files into a project but that 
  29. is not what I am trying to do. I am trying to successfully construct implementation files which 
  30. include function and member function definitions so that I can use these things over and over 
  31. (much like our standard library files -> iostream.h, stdlib.h, etc.)
  32.  
  33. If someone out there could give me some advice on how to achieve these things, I would greatly 
  34. appreciate it. I assumed that for this problem, the contents of the above files are irrelevant 
  35. and are not needed in conveying my message. 
  36.  
  37. If it matters, my compiler is Borland Turbo C++ 4.5 for Windows, But I am compiling these 
  38. programs as easy Win applications (pseudo DOS)
  39.  
  40. Keith Boruff
  41.